{% if forloop.first %}<ul class="planned-books">{% endif %}
    <li>
        <div class="book-title">
            {% if book.amazon_lookup %}
            <a href="{{ book.amazon_url }}" onclick="this.target='_blank'">{{ book.title }}</a>
            {% else %}
            {{ book.title }}
            {% endif %}
        </div>
        <div class="author">by {{ book.author_string }}</div>
    </li>
{% if forloop.last %}</ul>{% endif %}
